package com.xiaoshuidi.cloud.module.finance.dal.dataobject.finance;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xiaoshuidi.cloud.framework.mybatis.core.dataobject.BaseDO;
import com.xiaoshuidi.cloud.framework.tenant.core.db.TenantBaseDO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * 分账明细表
 */
@TableName(value = "finance_divide_detail", autoResultMap = true)
@KeySequence("finance_divide_detail_seq")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class FinanceDivideDetailDO extends TenantBaseDO {
    /**
     * 主键id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    private String sourceBizId;

    private String sourceBizType;

    private Long amount;

    private Long fee;

    private String tradeNoThird;

    /**
     * 交易状态 S 成功 F 失败  P处理中
     */
    private String status;

    /**
     * 支付时间
     */
    private LocalDateTime payTime;

    private Long apartmentId;

    private String accountName;

    private String accountNo;

    private Long accountId;

    /**
     * 是否是主账号
     */

    private Boolean primaryFlag;

    /**
     * 备注
     */
    private String remark;

}
